//
//  main.m
//  RetainCount-2
//
//  Created by quentin on 15/9/10.
//  Copyright (c) 2015年 QuentinLabs. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "RetainCount-2.h"

int main(int argc, const char * argv[]) {
    
    NSAutoreleasePool* pool;
    pool = [[NSAutoreleasePool alloc]init];
    
    RetainTracker* tracker;
    tracker = [RetainTracker new];
    [tracker retain];
    
    [tracker autorelease];
    [tracker release];
    
    NSLog(@"releaseing pool");
    
    [pool release];
    
    
    @autoreleasepool {
        // insert code here...
    //    NSLog(@"Hello, World!");
        
        RetainTracker* tracker2;
        tracker2 = [RetainTracker new];
        [tracker2 retain];
        [tracker2 autorelease];
        [tracker2 release];
        
        NSLog(@"auto releasing pool");
        
    }
    return 0;
}
